Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: null-defer about data and elem in wasm-interp #2436

Closed
wants to merge 2 commits into from

Conversation

tianstcht
Copy link
Contributor

fix some null-defer case about data and elem.

StringPrintf("out of bounds data access: access at %u "
">= max value %" PRIu64,
instr.imm_u32x2.snd,
inst_->datas().size()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't validation make this impossible?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the interpreter should be enforcing constraints that the validator should have already enforced... otherwise we will end up duplicating all the validation rules here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some formatting issue in the CI log, so I have chosen to use %zu to format vector's size correctly.

@tianstcht tianstcht force-pushed the main branch 2 times, most recently from f92f7fb to 16431b9 Compare June 28, 2024 05:17
@tianstcht
Copy link
Contributor Author

The patch also fix issue 2310 and 2311 with the same null-defer bug

@SoniEx2
Copy link
Contributor

SoniEx2 commented Jul 2, 2024

checking the sizes is okay but it's the wrong approach: the module in #2431 should fail validation, it's missing a data section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants